package com.kim.rssreader.domain.constant;

public class RssContentConstant {

	public static final String TABLE_NAME = "rss_content";

	public static final String KEY = "_id"; // 'rss文章内容id'
	public static final String CONTENTID = "_contentid"; // 'rss文章内容唯一标识'
	public static final String CONTENTTITLE = "_contenttitle"; // 'rss文章内容标题'
	public static final String CONTENTURL = "_contenturl"; // rss文章内容url
	public static final String CONTENTDESCRIPTION = "_contentdescription";// rss文章内容描述
	public static final String CONTENT = "_content"; // 'rss文章内容'
	public static final String CONTENTTIME = "_contenttime"; // 'rss文章内容日期'
	public static final String CONTENTREAD = "_contentread"; // 文章是否已读
	public static final String COLUNMID = "_colunmid"; //

	public static final int CONTENT_Key = 0; // 'rss文章内容id'
	public static final int CONTENT_CONTENTID = 1; // 'rss文章内容唯一标识'
	public static final int CONTENT_CONTENTTITLE = 2; // 'rss文章内容标题'
	public static final int CONTENT_CONTENTURL = 3; // rss文章内容url
	public static final int CONTNT_CONTENTDESCRIPTION = 4; // rss文章内容描述
	public static final int CONTENT_CONTENT = 5; // 'rss文章内容'
	public static final int CONTENT_CONTENTTIME = 6; // 'rss文章内容日期'
	public static final int CONTENT_CONTENTREAD = 7; // 文章是否已读
	public static final int CONTENT_COLUNMID = 8; //

	public static final String[] COLUMNS = new String[] { KEY, CONTENTID,
			CONTENTTITLE, CONTENTURL, CONTENTDESCRIPTION, CONTENT, CONTENTTIME,
			CONTENTREAD, COLUNMID };

	/**
	 * 忽略重复插入
	 */
	public static final String SQL_CREATE = "CREATE TABLE IF NOT EXISTS `rss_content` ("
			+ "`_id` INTEGER PRIMARY KEY AUTOINCREMENT,"
			+ "`_contentid` VARCHAR(100) NOT NULL,"
			+ "`_contenttitle` VARCHAR(100) NOT NULL,"
			+ "`_contenturl` VARCHAR(100) NOT NULL,"
			+ "`_contentdescription` TEXT,"
			+ "`_content` TEXT,"
			+ "`_contenttime` VARCHAR(30),"
			+ "`_contentread` bit,"
			+ "`_colunmid` VARCHAR(36),unique(`_contentid`) ON CONFLICT IGNORE )";
}
